package org.dey.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.dey.pojo.Member;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author deyran
 * @classname
 * @see BaseMapper
 */
@Repository
public interface MemberMapper extends BaseMapper<Member> {

    @Select("SELECT user_id FROM t_user_role WHERE role_id=2 AND user_id = #{healthmanager}")
    public Integer queryUserRole(Integer healthmanager);

    @Select("SELECT user_id FROM t_user_role WHERE role_id=2")
    public List<Integer> queryallUserRole(Integer uid);

    @Select("SELECT * FROM t_member WHERE file_number=#{fileNumber}")
    Member  queryRaByRaid(String fileNumber);
}
